webpackJsonp([59],{

/***/ "MRxX":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/regenerator/index.js
var regenerator = __webpack_require__("lC5x");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("J0Oq");
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);

// EXTERNAL MODULE: ./src/common/api/commonApi.js
var commonApi = __webpack_require__("+/+p");

// EXTERNAL MODULE: ./src/common/utils/index.js
var utils = __webpack_require__("dh3M");

// CONCATENATED MODULE: ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=script&index=0!./src/apps/security-risk/devices.vue


//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//



/* harmony default export */ var devices = ({
  data: function data() {
    var _this = this;

    return {
      rightData: [{
        font: 'yt-icon yt-icon-search',
        click: function click() {
          _this.search = !_this.search;
        }
      }],
      search: false,
      deviceCategoryDic: [],
      deviceCategoryDicSlected: [],
      searchApi: function () {
        var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(_ref2) {
          var skip = _ref2.skip,
              limit = _ref2.limit;
          var dicBefor, exclude, dicAfter, items;
          return regenerator_default.a.wrap(function _callee$(_context) {
            while (1) {
              switch (_context.prev = _context.next) {
                case 0:
                  _context.next = 2;
                  return commonApi["a" /* commonApi */].dictionary('equipment_category');

                case 2:
                  dicBefor = _context.sent;
                  exclude = ['equipment_category_camera'];
                  dicAfter = dicBefor.filter(function (v) {
                    return exclude.indexOf(v.D_code) === -1;
                  });

                  if (!_this.deviceCategoryDicSlected.length) {
                    dicAfter.forEach(function (v) {
                      _this.deviceCategoryDicSlected.push(v.D_text);
                    });
                  }
                  _context.next = 8;
                  return commonApi["a" /* commonApi */].search('measure_automation', { equalTo: { gridId: _this.$route.query.gridId }, containedIn: { DeviceCategory: _this.deviceCategoryDicSlected }, skip: skip, limit: limit });

                case 8:
                  items = _context.sent;

                  _this.deviceCategoryDic = dicAfter;
                  return _context.abrupt('return', Object(utils["d" /* ReplaceDictionary */])(items, { 'DeviceCategory:D_text:D_code': dicAfter }));

                case 11:
                case 'end':
                  return _context.stop();
              }
            }
          }, _callee, _this);
        }));

        return function searchApi(_x) {
          return _ref.apply(this, arguments);
        };
      }()
    };
  },

  methods: {
    onSearch: function onSearch() {
      this.search = false;
      this.$refs.group.startPull();
    }
  }
});
// CONCATENATED MODULE: ./node_modules/_vue-loader@13.7.3@vue-loader/lib/template-compiler?{"id":"data-v-141bf3dc","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=template&index=0!./src/apps/security-risk/devices.vue
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('yt-page',{attrs:{"title":"设备列表","rightData":_vm.rightData}},[_c('yt-group',{ref:"group",attrs:{"searchApi":_vm.searchApi,"group":false},scopedSlots:_vm._u([{key:"default",fn:function(item){return _c('yt-card',{attrs:{"title":item.DeviceName}},[_c('yt-cell',{attrs:{"label":"设备类型","value":item.DeviceCategory}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"报警上限","value":item.AlarmUpperThreshold}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"报警下限","value":item.AlarmLowerThreshold}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"实时值","value":item.value}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"管理部门","value":item.AdminDepartment}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"管理人员","value":item.AdminPersonnel}})],1)}}])}),_vm._v(" "),_c('yt-popup',{attrs:{"slot":"alert","pos":"right","mask":true},slot:"alert",model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:"search"}},[_c('yt-page',{staticClass:"page",attrs:{"flex":true,"leftData":[],"title":"设备类型"}},[_c('yt-form',[_c('yt-inlineSelect',{attrs:{"list":_vm.deviceCategoryDic,"x":2,"label":"D_text","val":"D_text","multiple":""},model:{value:(_vm.deviceCategoryDicSlected),callback:function ($$v) {_vm.deviceCategoryDicSlected=$$v},expression:"deviceCategoryDicSlected"}}),_vm._v(" "),_c('yt-btn-group',{attrs:{"slot":"btn","shadow":false},slot:"btn"},[_c('yt-btn',{attrs:{"theme":"white"},on:{"click":function($event){_vm.search = false}}},[_vm._v("关闭")]),_vm._v(" "),_c('yt-btn',{on:{"click":_vm.onSearch}},[_vm._v("确定")])],1)],1)],1)],1)],1)}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ var security_risk_devices = (esExports);
// CONCATENATED MODULE: ./src/apps/security-risk/devices.vue
function injectStyle (ssrContext) {
  __webpack_require__("tbIL")
}
var normalizeComponent = __webpack_require__("C7Lr")
/* script */


/* template */

/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = "data-v-141bf3dc"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  devices,
  security_risk_devices,
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)

/* harmony default export */ var apps_security_risk_devices = __webpack_exports__["default"] = (Component.exports);


/***/ }),

/***/ "tbIL":
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ })

});